package com.cooper.common.core.db;

import java.math.BigDecimal;

public class QueryPage {

    private int nextPage;

    private int iDisplayStart;

    private int iDisplayLength;

    private String sEcho;

    public int getiDisplayStart() {
        return iDisplayStart;
    }

    public void setiDisplayStart(int iDisplayStart) {
        this.iDisplayStart = iDisplayStart;
    }

    public int getiDisplayLength() {
        return iDisplayLength;
    }

    public void setiDisplayLength(int iDisplayLength) {
        this.iDisplayLength = iDisplayLength;
    }

    public String getsEcho() {
        return sEcho;
    }

    public void setsEcho(String sEcho) {
        this.sEcho = sEcho;
    }

    public int getNextPage() {
        return (int)Math.floor(new BigDecimal(this.getiDisplayStart())
                .divide(new BigDecimal(this.iDisplayLength)).doubleValue()) + 1;
    }

    public void setNextPage(int nextPage) {
        this.nextPage = nextPage;
    }
}
